home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / misc / emu / picsim_d.lha / PicSim / PIC_commands < prev    next >
Text File  |  1997-02-05  |  6KB  |  279 lines

  1.  
  2. 04.02.1997
  3.  
  4. Pic16C5x commands:
  5.  
  6.  
  7. fr    =    fileregister
  8. lit    =    literal
  9. W    =    Workingregister
  10. addr8    =    8bit address (jump)
  11. addr9    =    9bit address (call)
  12. addr11    =    11bit address (call with pageselect)
  13. d    =    d=0 -> result in W, d=1 -> result in fr (microchip)
  14.  
  15.  
  16.  
  17.  
  18. Parallax:            Description:
  19.  
  20. ADD    fr,#lit            add literal to fr
  21. ADD    fr1,fr2            add fr2 to fr1
  22. ADD    fr,W            add W to fr
  23. ADD    W,fr            add fr to W
  24. ADDB    fr,bit            add bit to fr
  25. AND    fr,#lit            fr and literal to fr
  26. AND    fr1,fr2            fr1 and fr2 to fr1
  27. AND    fr,W            fr and W to fr
  28. AND    W,#lit            W and literal to W
  29. AND    W,fr            W and fr to W
  30.  
  31. CALL    addr8            call subroutine
  32.  
  33. CJA    fr,#lit,addr9        compare and jump if fr
  34. CJA    fr1,fr2,addr9        compare and jump if fr1
  35. CJAE    fr,#lit,addr9        compare and jump if fr or equal
  36. CJAE    fr1,fr2,addr9        compare and jump if fr1 or equal
  37. CJB    fr,#lit,addr9        compare and jump if fr
  38. CJB    fr1,fr2,addr9        compare and jump if fr1
  39. CJBE    fr,#lit,addr9        compare and jump if fr or equal
  40. CJBE    fr1,fr2,addr9        compare and jump if fr1 or equal
  41. CJE    fr,#lit,addr9        compare and jump if equal
  42. CJE    fr1,fr2,addr9        compare and jump if equal
  43. CJNE    fr,#lit,addr9        compare and jump if not equal
  44. CJNE    fr1,fr2,addr9        compare and jump if not equal
  45.  
  46. CLC                clear carrybit
  47. CLR    fr            clear file register
  48. CLR    W            clear working register
  49. CLR    WDT            clear Watchdogtimer
  50. CLRB    bit            clear bit
  51. CLZ                clear zerobit
  52.  
  53. CSA    fr,#lit,addr9        compare and skip if fr
  54. CSA    fr1,fr2,addr9        compare and skip if fr1
  55. CSAE    fr,#lit,addr9        compare and skip if fr or equal 
  56. CSAE    fr1,fr2,addr9        compare and skip if fr1 or equal
  57. CSB    fr,#lit,addr9        compare and skip if fr
  58. CSB    fr1,fr2,addr9        compare and skip if fr1
  59. CSBE    fr,#lit,addr9        compare and skip if fr or equal
  60. CSBE    fr1,fr2,addr9        compare    and skip if fr1 or equal
  61. CSE    fr,#lit,addr9        compare and skip if equal
  62. CSE    fr1,fr2,addr9        compare and skip if equal
  63. CSNE    fr,#lit,addr9        compare and skip if not equal
  64. CSNE    fr1,fr2,addr9        compare and skip if not equal
  65.  
  66. DEC    fr            decrease fileregister
  67. DECSZ    fr            decrease fileregister and skip if zero
  68. DJNZ    fr,addr9        decrease fileregster and jump if not zero
  69. INC    fr            increase fileregister
  70. INCSZ    fr            increase fileregister and skip if zero
  71. IJNZ    fr,addr9        increase fileregister and jump if not zero
  72.  
  73. JB    bit,addr9        jump if bit
  74. JC    addr9            jump if carry
  75. JMP    addr9            jump
  76. JMP    PC+W            jump to pc + w
  77. JMP    W            jump to w
  78. JNB    bit,addr9        jump if not bit
  79. JNC    addr9            jump if not carrybit
  80. JNZ    addr9            jump if not zerobit
  81. JZ    addr9            jump if zero bit
  82.  
  83. LCALL    addr11            long call
  84. LJMP    addr11            long jump
  85. LSET    addr11            long set
  86.  
  87. MOV    fr,#lit            move literal to fileregister
  88. MOV    fr1,fr2            move fr2 to fr1
  89. MOV    fr,W            move w to fr
  90. MOV    OPTION,#lit        move literal to optionregister
  91. MOV    OPTION,fr        move fr to optionregister
  92. MOV    OPTION,W        move w to optionregister
  93. MOV    !port_fr,#lit        move literal to tristateregister
  94. MOV    !port_fr,fr        move fr to tristateregister
  95. MOV    !port_fr,W        move w to tristateregister
  96. MOV    W,#lit            move literal to w
  97. MOV    W,fr            move fr to w
  98. MOV    W,/fr            move not fr to w
  99. MOV    W,fr-W            move w - fr to w
  100. MOV    W,++fr            move increased fr to w
  101. MOV    W,--fr            move dercreased fr to w
  102. MOV    W,<<fr            move left rotatet fr to w
  103. MOV    W,>>fr            move right rotatet fr to w
  104. MOV    W,<>fr            move swapped nibbles fr to w
  105.  
  106. MOVB    bit1,bit2        move bit2 to bit1
  107. MOVB    bit1,/bit2        move not bit2 to bit1
  108. MOVSZ    W,++fr            move increased fr to w and skip if zero
  109. MOVSZ    W,--fr            move decreased fr to w and skip if zero
  110.  
  111. NEG    fr            negate fr (not fr + 1)
  112.  
  113. NOP                no operation
  114.  
  115. NOT    fr            not fr
  116. NOT    W            not w
  117.  
  118. OR    fr,#lit            or literal and fr to fr
  119. OR    fr1,fr2            or fr2 and fr1 to fr1
  120. OR    fr,W            or w and fr to fr
  121. OR    W,#lit            or literal and w to w
  122. OR    W,fr            or fr and w to w
  123.  
  124. RET                return from subroutine, clear w
  125. RETW    lit,lit,...        return from subroutine, W=literal
  126.  
  127. RL    fr            rotate fr left
  128. RR    fr            rotate fr right
  129.  
  130. SB    bit            skip if bit
  131. SC                skip if carry
  132.  
  133. SETB    bit            set bit
  134.  
  135. SKIP                skip next command
  136.  
  137. SLEEP                sleepmode
  138.  
  139. SNB    bit            skip if not bit
  140. SNC                skip if not carry
  141.  
  142. SNZ                skip if not zero
  143.  
  144. STC                set carrybit
  145. STZ                set zerobit
  146.  
  147. SUB    fr,#lit            sub literal from fr to fr
  148. SUB    fr1,fr2            sub fr2 from fr1 to fr1
  149. SUB    fr,W            sub w from fr to fr
  150.  
  151. SUBB    fr,bit            decrease fr if not bit
  152.  
  153. SWAP    fr            swap nibbles
  154.  
  155. SZ                skip if zero
  156.  
  157. TEST    fr            test fr if zero
  158.  
  159. XOR    fr,#lit            xor literal and fr to fr
  160. XOR    fr1,fr2            xor fr2 and fr1 to fr1
  161. XOR    fr,W            xor w and fr to fr
  162. XOR    W,#lit            xor literal and w to w
  163. XOR    W,fr            xor fr and w to w
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181. Microchip            Description:
  182.  
  183. ADDWF    fr,d            add W and fr
  184. ADDWF    fr        
  185. ADDWF    fr,W
  186.  
  187. ANDLW    lit            and W and literal
  188. ANDWF    fr,d            and W and fr
  189. ANDWF    fr
  190. ANDWF    fr,W
  191.  
  192. BCF    fr,b            clear bit
  193. BCF    bit
  194. BSF    fr,b            set bit
  195. BSF    bit
  196.  
  197. BTFSC    fr,b            test bit and skip if bit clear
  198. BTFSC    bit
  199. BTFSS    fr,b            test bit and skip if bit set
  200. BTFSS    bit
  201.  
  202. CALL    addr8            call address
  203.  
  204. CLRF    fr            clear fileregister
  205. CLRW                clear Workingregister
  206. CLRWDT                clear Watchdogtimer
  207.  
  208. COMF    fr,d            complement from fr
  209. COMF    fr
  210. COMF    fr,W
  211.  
  212. DECF    fr,d            decrease fr
  213. DECF    fr
  214. DECF    fr,W
  215.  
  216. DECFSC    fr,d            decrease fr and skip if zero
  217. DECFSC    fr
  218. DECFSC    fr,W
  219.  
  220. GOTO    addr9            goto address
  221.  
  222. INCF    fr,d            increase fr
  223. INCF    fr
  224. INCF    fr,W
  225.  
  226. INCFSC    fr,d            increase fr and skip if zero
  227. INCFSC    fr
  228. INCFSC    fr,W
  229.  
  230. IORLW    lit            or literal and W
  231. IORWF    fr,d            or fr and W
  232. IORWF    fr
  233. IORWF    fr,W
  234.  
  235. MOVF    fr,d            move fr
  236. MOVF    fr
  237. MOVF    fr,W
  238. MOVLW    lit            move literal to W
  239. MOVWF    fr            move W to fr
  240.  
  241. NOP                no operation
  242.  
  243. OPTION                move W in Optionregister
  244.  
  245. RETLW    lit            return from subroutine with literal in W
  246. RETLW                return from subroutine with clear W
  247.  
  248. RLF    fr,d            rotate fr left
  249. RLF    fr
  250. RLF    fr,W
  251.     
  252. RRF    fr,d            rotate fr right
  253. RRF    fr
  254. RRF    fr,W
  255.  
  256. SLEEP                sleep mode
  257.  
  258. SUBWF    fr,d            sub fr from W
  259. SUBWF    fr            
  260. SUBWF    fr,W
  261.  
  262. SWAPF    fr,d            swap nibbles from fr
  263. SWAPF    fr
  264. SWAPF    fr,W
  265.  
  266. TRIS    port_fr            move W to Tristate register
  267. TRISA
  268. TRISB
  269. TRISC
  270.  
  271. XORLW    lit            literal xor W 
  272. XORWF    fr,d            fr xor W
  273. XORWF    fr
  274. XORWF    fr,W
  275.  
  276.  
  277. Dirk Düsterberg, duesterb@unixserv.rz.fh-hannover.de
  278.                  http://linux.rz.fh-hannover.de/~duesterb
  279.